Update cfg
authorJeroen van der Heijden <jeroen@transceptor.technology>
Fri, 12 Oct 2018 18:44:28 +0000 (20:44 +0200)
committerJeroen van der Heijden <jeroen@transceptor.technology>
Fri, 12 Oct 2018 18:44:28 +0000 (20:44 +0200)
src/cfgparser/cfgparser.c
src/siri/cfg/cfg.c

index c1e00e3de34412f3a23f9338236d3009ac3311d4..3ae8599a6d2e215a38de1fa9bcd80ee07348bd48 100644 (file)
@@ -336,19 +336,19 @@ const char * cfgparser_errmsg(cfgparser_return_t err)
     switch (err)
     {
     case CFGPARSER_SUCCESS:
-        return "success: configuration file parsed successfully";
+        return "configuration file parsed successfully";
     case CFGPARSER_ERR_READING_FILE:
-        return "error: cannot open file for reading";
+        return "cannot open file for reading";
     case CFGPARSER_ERR_SESSION_NOT_OPEN:
-        return "error: got a line without a section";
+        return "got a line without a section";
     case CFGPARSER_ERR_MISSING_EQUAL_SIGN:
-        return "error: missing equal sign in at least one line";
+        return "missing equal sign in at least one line";
     case CFGPARSER_ERR_OPTION_ALREADY_DEFINED:
-        return "error: option defined twice within one section";
+        return "option defined twice within one section";
     case CFGPARSER_ERR_SECTION_NOT_FOUND:
-        return "error: section not found";
+        return "section not found";
     case CFGPARSER_ERR_OPTION_NOT_FOUND:
-        return "error: option not found";
+        return "option not found";
     }
     return "";
 }
index 210d2d89d6c162393ae599be8b67eebf903bd48e..f7e399592d63cb97d9b6c2db040ef821ecc47ca2 100644 (file)
@@ -74,7 +74,7 @@ void siri_cfg_init(siri_t * siri)
          * not what users want so lets quit.
          */
         log_critical(
-                "Could not read '%s': %s\n",
+                "Cannot read '%s' (%s)\n",
                 siri->args->config,
                 cfgparser_errmsg(rc));
         cfgparser_free(cfgparser);
@@ -170,7 +170,7 @@ static void SIRI_CFG_read_uint(
     if (rc != CFGPARSER_SUCCESS)
     {
         log_warning(
-                "Missing '%s' in '%s': %s. "
+                "Missing '%s' in '%s' (%s). "
                 "Using default value: '%u'",
                 option_name,
                 siri.args->config,
@@ -218,7 +218,7 @@ static void SIRI_CFG_read_ip_support(cfgparser_t * cfgparser)
     if (rc != CFGPARSER_SUCCESS)
     {
         log_warning(
-                "Missing '%s' in '%s': %s. "
+                "Missing '%s' in '%s' (%s). "
                 "Using default value: '%s'",
                 "ip_support",
                 siri.args->config,
@@ -274,8 +274,8 @@ static void SIRI_CFG_read_shard_compression(cfgparser_t * cfgparser)
                 "enable_shard_compression");
     if (rc != CFGPARSER_SUCCESS)
     {
-        log_debug(
-                "Missing '%s' in '%s': %s. "
+        log_warning(
+                "Missing '%s' in '%s' (%s). "
                 "Disable shard compression",
                 "enable_shard_compression",
                 siri.args->config,
@@ -307,8 +307,8 @@ static void SIRI_CFG_read_pipe_support(cfgparser_t * cfgparser)
                 "enable_pipe_support");
     if (rc != CFGPARSER_SUCCESS)
     {
-        log_debug(
-                "Missing '%s' in '%s': %s. "
+        log_warning(
+                "Missing '%s' in '%s' (%s). "
                 "Disable pipe support",
                 "enable_pipe_support",
                 siri.args->config,
@@ -386,7 +386,7 @@ static void SIRI_CFG_read_pipe_client_name(cfgparser_t * cfgparser)
     if (rc != CFGPARSER_SUCCESS)
     {
         log_warning(
-                "Missing '%s' in '%s': %s. "
+                "Missing '%s' in '%s' (%s). "
                 "Using default value: '%s'",
                 "pipe_client_name",
                 siri.args->config,
@@ -445,7 +445,7 @@ static void SIRI_CFG_read_default_db_path(cfgparser_t * cfgparser)
     if (rc != CFGPARSER_SUCCESS)
     {
         log_warning(
-                "Missing '%s' in '%s': %s. "
+                "Missing '%s' in '%s' (%s). "
                 "Using default value: '%s'",
                 "default_db_path",
                 siri.args->config,
@@ -607,7 +607,7 @@ static void SIRI_CFG_read_address_port(
     if (rc != CFGPARSER_SUCCESS)
     {
         log_critical(
-                "Missing '%s' in '%s': %s.",
+                "Missing '%s' in '%s' (%s).",
                 option_name,
                 siri.args->config,
                 cfgparser_errmsg(rc));